﻿Imports System
Imports System.Collections

Public Class IndicesBE
#Region "Campos y Propiedades"
    Private _IdIndice As Integer
    Private _Nombre As String
    Private _NombreInterno As String
    Private _IdTipoDocumental As Integer
    Private _NombreTipoDocumental As String
    Private _IdTipoDato As Integer
    Private _IdLista As Integer
    Private _MascaraEntrada As String
    Private _RangoInicio As String
    Private _RangoFin As String
    Private _FormatoFecha As String
    Private _MostrarComoRadio As Boolean
    Private _Duplicado As Boolean
    Private _Obligatorio As Boolean
    Private _DobleDigitacion As Boolean
    Private _OptValorDefecto As String
    Private _Prefijo As String
    Private _PrefijoAdelante As Boolean
    Private _CorrelativoValor As Integer
    Private _CorrelativoSumar As Boolean
    Private _CadenaVariables As String
    Private _IdDatoExterno As Integer
    Private _ConsultaSQLExterna As String
    Private _TipoIndexacion As String
    Private _Coordenadas As String
    Private _ScrollPosicionX As String
    Private _ScrollPosicionY As String
    Private _CoordenadasPagina As Short
    Private _ZoomAutomatico As Boolean
    Private _ValueDefault As Boolean
    Private _Correlativy As Boolean
    Private _CreateIndice As Boolean
    Private _QueryDB As Boolean
    Private _PrefijoBol As Boolean
    Private _IndicesGrilla As IndiceGrillaBE
    Private _IndicesGrillaCollection As IndiceGrillaBECollection

    Public Property IndicesGrillaCollection() As IndiceGrillaBECollection
        Get
            Return _IndicesGrillaCollection
        End Get
        Set(ByVal value As IndiceGrillaBECollection)
            _IndicesGrillaCollection = value
        End Set
    End Property

    Public Property IndicesGrilla() As IndiceGrillaBE
        Get
            Return _IndicesGrilla
        End Get
        Set(ByVal value As IndiceGrillaBE)
            _IndicesGrilla = value
        End Set
    End Property

    Public Property IdIndice() As Integer
        Get
            Return _IdIndice
        End Get
        Set(ByVal value As Integer)
            _IdIndice = value
        End Set
    End Property
    Public Property IdTipoDocumental() As Integer
        Get
            Return _IdTipoDocumental
        End Get
        Set(ByVal value As Integer)
            _IdTipoDocumental = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property
    Public Property NombreTipoDocumental() As String
        Get
            Return _NombreTipoDocumental
        End Get
        Set(ByVal value As String)
            _NombreTipoDocumental = value
        End Set
    End Property

    Public Property NombreInterno() As String
        Get
            Return _NombreInterno
        End Get
        Set(ByVal value As String)
            _NombreInterno = value
        End Set
    End Property

    Public Property IdTipoDato() As Integer
        Get
            Return _IdTipoDato
        End Get
        Set(ByVal value As Integer)
            _IdTipoDato = value
        End Set
    End Property

    Public Property IdLista() As Integer
        Get
            Return _IdLista
        End Get
        Set(ByVal value As Integer)
            _IdLista = value
        End Set
    End Property

    Public Property MascaraEntrada() As String
        Get
            Return _MascaraEntrada
        End Get
        Set(ByVal value As String)
            _MascaraEntrada = value
        End Set
    End Property

    Public Property RangoInicio() As String
        Get
            Return _RangoInicio
        End Get
        Set(ByVal value As String)
            _RangoInicio = value
        End Set
    End Property

    Public Property RangoFin() As String
        Get
            Return _RangoFin
        End Get
        Set(ByVal value As String)
            _RangoFin = value
        End Set
    End Property

    Public Property FormatoFecha() As String
        Get
            Return _FormatoFecha
        End Get
        Set(ByVal value As String)
            _FormatoFecha = value
        End Set
    End Property

    Public Property MostrarComoRadio() As Boolean
        Get
            Return _MostrarComoRadio
        End Get
        Set(ByVal value As Boolean)
            _MostrarComoRadio = value
        End Set
    End Property

    Public Property Duplicado() As Boolean
        Get
            Return _Duplicado
        End Get
        Set(ByVal value As Boolean)
            _Duplicado = value
        End Set
    End Property

    Public Property Obligatorio() As Boolean
        Get
            Return _Obligatorio
        End Get
        Set(ByVal value As Boolean)
            _Obligatorio = value
        End Set
    End Property

    Public Property DobleDigitacion() As Boolean
        Get
            Return _DobleDigitacion
        End Get
        Set(ByVal value As Boolean)
            _DobleDigitacion = value
        End Set
    End Property

    Public Property OptValorDefecto() As String
        Get
            Return _OptValorDefecto
        End Get
        Set(ByVal value As String)
            _OptValorDefecto = value
        End Set
    End Property

    Public Property Prefijo() As String
        Get
            Return _Prefijo
        End Get
        Set(ByVal value As String)
            _Prefijo = value
        End Set
    End Property

    Public Property PrefijoAdelante() As Boolean
        Get
            Return _PrefijoAdelante
        End Get
        Set(ByVal value As Boolean)
            _PrefijoAdelante = value
        End Set
    End Property

    Public Property CorrelativoValor() As Integer
        Get
            Return _CorrelativoValor
        End Get
        Set(ByVal value As Integer)
            _CorrelativoValor = value
        End Set
    End Property

    Public Property CorrelativoSumar() As Boolean
        Get
            Return _CorrelativoSumar
        End Get
        Set(ByVal value As Boolean)
            _CorrelativoSumar = value
        End Set
    End Property

    Public Property CadenaVariables() As String
        Get
            Return _CadenaVariables
        End Get
        Set(ByVal value As String)
            _CadenaVariables = value
        End Set
    End Property

    Public Property IdDatoExterno() As Integer
        Get
            Return _IdDatoExterno
        End Get
        Set(ByVal value As Integer)
            _IdDatoExterno = value
        End Set
    End Property

    Public Property ConsultaSQLExterna() As String
        Get
            Return _ConsultaSQLExterna
        End Get
        Set(ByVal value As String)
            _ConsultaSQLExterna = value
        End Set
    End Property

    Public Property TipoIndexacion() As String
        Get
            Return _TipoIndexacion
        End Get
        Set(ByVal value As String)
            _TipoIndexacion = value
        End Set
    End Property

    Public Property Coordenadas() As String
        Get
            Return _Coordenadas
        End Get
        Set(ByVal value As String)
            _Coordenadas = value
        End Set
    End Property

    Public Property ScrollPosicionX() As String
        Get
            Return _ScrollPosicionX
        End Get
        Set(ByVal value As String)
            _ScrollPosicionX = value
        End Set
    End Property

    Public Property ScrollPosicionY() As String
        Get
            Return _ScrollPosicionY
        End Get
        Set(ByVal value As String)
            _ScrollPosicionY = value
        End Set
    End Property

    Public Property CoordenadasPagina() As Short
        Get
            Return _CoordenadasPagina
        End Get
        Set(ByVal value As Short)
            _CoordenadasPagina = value
        End Set
    End Property

    Public Property ZoomAutomatico() As Boolean
        Get
            Return _ZoomAutomatico
        End Get
        Set(ByVal value As Boolean)
            _ZoomAutomatico = value
        End Set
    End Property

    'Private _ValueDefault As Boolean
    'Private _Correlativy As Boolean
    'Private _CreateIndice As Boolean
    'Private _QueryDB As Boolean

    Public Property ValueDefault() As Boolean
        Get
            Return _ValueDefault
        End Get
        Set(ByVal value As Boolean)
            _ValueDefault = value
        End Set
    End Property

    Public Property Correlativy() As Boolean
        Get
            Return _Correlativy
        End Get
        Set(ByVal value As Boolean)
            _Correlativy = value
        End Set
    End Property

    Public Property CreateIndice() As Boolean
        Get
            Return _CreateIndice
        End Get
        Set(ByVal value As Boolean)
            _CreateIndice = value
        End Set
    End Property

    Public Property QueryDB() As Boolean
        Get
            Return _QueryDB
        End Get
        Set(ByVal value As Boolean)
            _QueryDB = value
        End Set
    End Property

    Public Property PrefijoBol() As Boolean
        Get
            Return _PrefijoBol
        End Get
        Set(ByVal value As Boolean)
            _PrefijoBol = value
        End Set
    End Property

#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdIndice As Integer, ByVal Nombre As String, ByVal NombreInterno As String, ByVal IdTipoDato As Integer, ByVal IdLista As Integer, ByVal MascaraEntrada As String, ByVal RangoEntrada As String, ByVal FormatoFecha As String, ByVal MostrarComoRadio As Boolean, ByVal Duplicado As Boolean, ByVal Obligatorio As Boolean, ByVal DobleDigitacion As Boolean, ByVal OptValorDefecto As String, ByVal Prefijo As String, ByVal PrefijoAdelante As Boolean, ByVal CorrelativoValor As Integer, ByVal CorrelativoSumar As Boolean, ByVal CadenaVariables As String, ByVal IdDatoExterno As Integer, ByVal ConsultaSQLExterna As String, ByVal TipoIndexacion As String, ByVal Coordenadas As String, ByVal ScrollPosicionX As String, ByVal ScrollPosicionY As String, ByVal CoordenadasPagina As Short, ByVal ZoomAutomatico As Boolean)
        Me._IdIndice = IdIndice
        Me._Nombre = Nombre
        Me._NombreInterno = NombreInterno
        Me._IdTipoDato = IdTipoDato
        Me._IdLista = IdLista
        Me._MascaraEntrada = MascaraEntrada

        Me._RangoInicio = RangoInicio
        Me._RangoFin = RangoFin

        Me._FormatoFecha = FormatoFecha
        Me._MostrarComoRadio = MostrarComoRadio
        Me._Duplicado = Duplicado
        Me._Obligatorio = Obligatorio
        Me._DobleDigitacion = DobleDigitacion
        Me._OptValorDefecto = OptValorDefecto
        Me._Prefijo = Prefijo
        Me._PrefijoAdelante = PrefijoAdelante
        Me._CorrelativoValor = CorrelativoValor
        Me._CorrelativoSumar = CorrelativoSumar
        Me._CadenaVariables = CadenaVariables
        Me._IdDatoExterno = IdDatoExterno
        Me._ConsultaSQLExterna = ConsultaSQLExterna
        Me._TipoIndexacion = TipoIndexacion
        Me._Coordenadas = Coordenadas
        Me._ScrollPosicionX = ScrollPosicionX
        Me._ScrollPosicionY = ScrollPosicionY
        Me._CoordenadasPagina = CoordenadasPagina
        Me._ZoomAutomatico = ZoomAutomatico
    End Sub
#End Region
End Class

Public Class IndicesBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As IndicesBE
        Get
            Return CType(List(index), IndicesBE)
        End Get
        Set(ByVal value As IndicesBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As IndicesBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As IndicesBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As IndicesBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As IndicesBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As IndicesBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class



